This invention relates to data processing and, more particularly, to a data processing apparatus for processing digital data in accordance with a plurality of predetermined tasks of preassigned priority values.
A data processing apparatus can be thought of as being generally comprised of a data section and a control section. The control section supplies the various processing instructions to be executed by the data section in order to perform a sequence of operations constituting a particular task to be carried out or "serviced." The use of microprogrammed data processing is now widespread. In such a data processing apparatus, the instructions stored in an instruction memory of the control section of the processor would be microinstructions.
It is known to provide a microprogrammed data processing apparatus which executes sequences of microinstructions, i.e. "routines," each routine being identified with a particular task to be serviced, wherein the microinstruction routine identified with the task having the highest preassigned priority value will preempt all other routines. Thus, if, during the execution of a routine for the current highest priority task, a new task request is received having a higher priority value, then the old routine is preempted or "interrupted" in favor of the routine identified with the new task.
As is conventional, sequencing through a routine of microinstructions identified with a particular task is accomplished by driving a program counter whose output provides an address to the instruction memory. In the past, the contents of the program counter for a particular task would be loaded into a "push-down-stack" register if that task was interrupted by a task having a higher priority. If yet another new task having yet a higher priority was received by the processor, the program counter contents for the first task would be pushed down one more register in the stack, with the contents of the program counter for the second task now being loaded at the top register of the stack. The program counter itself would then be active to address the instruction memory relative to the routine for the new task just received.
Although, when the first task was interrupted, the contents of its program counter (now in the push-down-stack) would indicate the next address for the instruction following the last to be executed prior to interrupt, yet the routine for the new interrupting task would have to begin at the very first instruction for that routine and then run through the entire sequence of instructions for that routine, unless itself interrupted by a still higher priority task request. Thus, even though only a particular segment of the routine for the interrupting new task need be executed at this time, such segment identifying a particular function in the overall task to be serviced and commencing at a location different than the start of the entire routine for that task, yet the routine would still have to begin at the first instruction rather than the particular instruction marking the start of the particular segment desired for servicing.
It would be desirable, therefore, to provide a data processing apparatus wherein the routine for any interrupting higher priority task would commence at the instruction identifying the commencement of the particular function of the task actually requesting service, even though this instruction may be other than the first instruction of the entire routine for that task.